<p id="notice"><%= notice %></p>

<h2> <%= @validation_issue.issue_type %>: <%= @validation_issue.form_name %> </h2>

<div class='gray_table'>
  <table >
    <thead>
    <tr >
      <th class='column1_header'>Type</th>
      <th>Form Name</th>
      <th># of Issues</th>
      <th>Total Count</th>
      <th></th>
      <th></th>
    </tr>

    </thead>
    <tr >
      <td><%= @validation_issue.issue_type %></td>
      <td><%= @validation_issue.form_name %></td>
      <td><%= @validation_issue.issue_count %></td>
      <td><%= @validation_issue.total_count %></td>
      <td><%= link_to 'Show', validation_admin_validation_issue_path(@validation_issue) %></td>
      <td><%= link_to 'Reset!',
                      validation_admin_validation_issue_path(@validation_issue),
                      method: :delete, data: { confirm: 'Are you sure?' } %></td>
    </tr>
    <% if  @validation_issue.issue_hash.empty? %>
      <tr <%= cycle('odd', 'even')%>>
        <td colspan='6'>Sorry no Issues Yet</td>
      </tr>
    <% else %>
      <thead>
        <tr>
          <th colspan='2'  class='column1_header'>Field</th>
          <th colspan='4'># of Issues</th>
        </tr>
      </thead>
    <% end %>
  <% @validation_issue.issue_hash.each do |k, v| %>
    <tr <%= cycle('odd', 'even')%>>
      <td colspan='2'><%= k %></td>
      <td colspan='4'><%= v %></td>
    </tr>
  <% end %>

  </table>
</div>


<% unless @validation_issue.notes.blank? %>
  <p>
    <b>Notes:</b>
    <%= @validation_issue.notes %>
  </p>
<% end %>

<%= link_to 'Back', validation_admin_validation_issues_path, :class => 'button dark-orange-button' %>
